var columns = [{field:"id",title:"编号"},{field:"accountName",title:"账户名"},
   {field:"ip",title:"IP"},{field:"remark",title:"说明"},{field:"status",title:"状态"},
   {field:"loginTime",title:"登录时间",formatter:
   		function(value,row,index){
		return value!=null && value!=""?new Date(value).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''):null;
	}}];
function queryParams(params) {
	var param = {
			pageNumber : params.pageNumber,
			pageSize : params.pageSize,
		};
	return param;
}
var login_log_table = $('#login_log_table');//通过table id获取需要初始化的table
//初始化的table
initTable(login_log_table,$('#login_log_toolbar'),'loginlog/list',columns,queryParams,'zh-CN',false);

function delteAll(){
	var ids = login_log_table.bootstrapTable("getData");
	if (ids.length==0) {
		layer.msg("没有记录", {icon:0});
	}else{
		layer.confirm('确定清空所有记录？',{icon:3},function (index) {
			$.post('loginlog/deleteBatch',null,function(json){
				if(json.status){
					login_log_table.bootstrapTable('refresh');
				}
			  layer.msg(json.message);
			})
			layer.close(index);
		});
	}
}



